<html>

<head>
	<title>电子健康卡</title>
	<meta charset="utf-8">
	<meta name="format-detection" content="telephone=no">
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<link rel="stylesheet" type="text/css" href="css/base.css">
	<link rel="stylesheet" type="text/css" href="css/list.css">
</head>

<body>
	<div class="wrap">
		<div class="cardlist" id="cardlist">
		</div>
		<div class="button">
			<div class="addbtn" id="addcard">+ 添加健康卡</div>
			<p class="tips" id="tips"></p>
		</div>
	</div>
</body>
<script type="text/javascript" src="js/jweixin-1.4.0.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.qrcode.js"></script>
<script type="text/javascript" src="js/jquery-barcode.min.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<script type="text/javascript" src="js/utf.js"></script>
<script type="text/javascript" src="js/list.js?aaa"></script>
<script type="text/javascript">

	$.ajax({
		url: 'http://healthcard.jkgly.cn/api/jkgly/getWXConfigSignature?url=' + encodeURIComponent(location.href.split('#')[0]),
		dataType: 'json',
		type: 'get',
		success: function (res) {
			if (res.appId != '') {
				wx.config({
					debug: false,
					appId: res.appId,
					timestamp: res.timestamp,
					nonceStr: res.nonceStr,
					signature: res.signature,
					jsApiList: ['updateAppMessageShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage']
				})
			}
		}
	})

	wx.ready(function () { //需在用户可能点击分享按钮前就先调用
		wx.updateAppMessageShareData({
			title: '微信服务号电子健康卡个人中心', // 分享标题
			desc: '微信服务号电子健康卡。', // 分享描述
			link: 'http://healthcard.jkgly.cn/list.html', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
			imgUrl: 'http://healthcard.jkgly.cn/img/icon2.png' // 分享图标
		}, function (res) {
			//这里是回调函数 
		})

		wx.onMenuShareAppMessage({
			title: '微信服务号电子健康卡个人中心', // 分享标题
			desc: '微信服务号电子健康卡。', // 分享描述
			link: 'http://healthcard.jkgly.cn/list.html', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
			imgUrl: 'http://healthcard.jkgly.cn/img/icon2.png', // 分享图标
			success: function () {
				// 用户点击了分享后执行的回调函数
			}
		});
	})
</script>

</html>